﻿<%@ Page Title="" Language="C#" MasterPageFile="~/User/User.Master" AutoEventWireup="true" CodeBehind="SelectWLKC.aspx.cs" Inherits="CoolERP_Web.User.SelectWLKC" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<script src="../Scripts/lhgdialog/lhgcore.min.js" type="text/javascript"></script>
<script src="../Scripts/lhgdialog/lhgdialog.js" type="text/javascript"></script>
<script type="text/javascript">
    var DG = frameElement.lhgDG;
    function doSubmit() {
        var flag = false;
        $("#GridView1 input[type=checkbox][id=chkSel]").each(function () {
            if ($(this).attr("checked") == true) {
                flag = true;
                return;
            }
        });
        if (flag)
            DG.curWin.selMore();
        else
            alert("请至少选择一种物料");
    }
</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
        <td class=tbHead_L></td>
        <td class=tbHead_M></td>
        <td class=tbHead_R></td>
    </tr>
    <tr>
        <td class=tbBody_L></td>
        <td class=tbBody_M>
            <ul class=tags>
                <li class=liTitle><div>查找物料</div></li>
            </ul>
            <table class="grvCSS" cellspacing="0" border="1" style="width:100%;border-collapse:collapse;">
                <tr>
                    <td id="tdGYS" runat=server>供应商：<asp:DropDownList ID="ddlGYS" runat="server" CssClass="dropdown"/></td>
                    <td>物料类型：<asp:DropDownList ID="ddlWLLX" runat="server" CssClass="dropdown"/></td>
                    <td>物料名称：<asp:TextBox ID="txtName" runat="server" CssClass="textbox" MaxLength="16"/></td>
                    <td><asp:ImageButton ID="btnQuery" runat="server" ImageUrl="~/Images/Common/btn_query0.png" OnClick="btnQuery_Click" />
                    <asp:ImageButton ID="btnReset" runat="server" ImageUrl="~/Images/Common/btn_reset0.png" OnClick="btnReset_Click" /></td>
                </tr>
            </table>
            <ul class=tags>
                <li class=liTitle><div>物料库存列表</div></li>
                <li class=liRight><font color=red>可同时选择多个，然后点击“确定”按钮</font></li>
            </ul>
            <asp:GridView ID="GridView1" runat="server" Width=100% PageSize=15 ClientIDMode=Static CssClass="grvCSS" AutoGenerateColumns="False" AllowPaging="True">
                <Columns>
                    <asp:TemplateField>
                        <HeaderTemplate><label><input type="checkbox" onclick="checkAll('GridView1',this)" />全选</label></HeaderTemplate>
                        <ItemTemplate><input type=checkbox id="chkSel" name="chkSel" value='<%# Eval("WPID") %>' />
                        <input type=hidden id="hidBH" value='<%# Eval("BH") %>' /><input type=hidden id="hidMC" value='<%# Eval("MC") %>' /><input type=hidden id="hidDWBH" value='<%# Eval("DWBH") %>' />
                        <input type=hidden id="hidGG" value='<%# Eval("GG") %>' /><input type=hidden id="hidYS" value='<%# Eval("YS") %>' /><input type=hidden id="hidDWMC" value='<%# Eval("DWMC") %>' />
                        <input type=hidden id="hidCKID" value='<%# Eval("CKID") %>' /><input type=hidden id="hidCKMC" value='<%# Eval("CKMC") %>' /><input type=hidden id="hidSL" value='<%# Eval("SL") %>' />
                        <input type=hidden id="hidCWID" value='<%# Eval("CWID") %>' /><input type=hidden id="hidDJ" value='<%# Convert.ToDecimal(Eval("ZXDJ")).ToString("F")%>' />
                        <input type=hidden id="hidCWMC" value='<%# Eval("QU")%>-<%# Eval("HANG")%>-<%# Eval("LIE")%>-<%# Eval("CENG")%>-<%# Eval("GE")%>' />
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:BoundField HeaderText="物料类型" DataField="LXMC"/>
                    <asp:BoundField HeaderText="物料编号" DataField="BH"/>
                    <asp:BoundField HeaderText="物料名称" DataField="MC"/>
                    <asp:BoundField HeaderText="物料规格" DataField="GG"/>
                    <asp:BoundField HeaderText="颜色" DataField="YS"/>
                    <asp:BoundField HeaderText="供应商" DataField="GYSMC"/>
                    <asp:TemplateField>
                        <HeaderTemplate>入库<br />单位</HeaderTemplate>
                        <ItemTemplate><%# Eval("DWMC")%></ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField>
                        <HeaderTemplate>最低<br />库存</HeaderTemplate>
                        <ItemTemplate><%# Convert.ToDecimal(Eval("ZDKCSL")).ToString("F")%></ItemTemplate>
                    </asp:TemplateField>   
                    <asp:TemplateField>
                        <HeaderTemplate>库存<br />数量</HeaderTemplate>
                        <ItemTemplate><%# Convert.ToDecimal(Eval("SL")).ToString("F")%></ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField>
                        <HeaderTemplate>平均<br />单价</HeaderTemplate>
                        <ItemTemplate><%# Convert.ToDecimal(Eval("PJDJ")).ToString("0.0000")%></ItemTemplate>
                    </asp:TemplateField>
                    <asp:TemplateField>
                        <HeaderTemplate>最新<br />单价</HeaderTemplate>
                        <ItemTemplate><%# Convert.ToDecimal(Eval("ZXDJ")).ToString("F")%></ItemTemplate>
                    </asp:TemplateField>
                    <asp:BoundField DataField="CKMC" HeaderText="仓库"/>
                    <asp:TemplateField>
                        <HeaderTemplate>仓位（区-行-列-层-格）</HeaderTemplate>
                        <ItemTemplate><%# Eval("QU")%>-<%# Eval("HANG")%>-<%# Eval("LIE")%>-<%# Eval("CENG")%>-<%# Eval("GE")%></ItemTemplate>
                    </asp:TemplateField>                               
                </Columns>
                <PagerSettings Visible=false />
            </asp:GridView>
            <webdiyer:AspNetPager ID="AspNetPager1" runat="server" AlwaysShow="True" CssClass="pager" UrlPaging="false" ShowCustomInfoSection="Left"
                FirstPageText="首页" LastPageText="尾页" PrevPageText="前页" NextPageText="后页" OnPageChanged="AspNetPager1_PageChanged" 
                TextAfterPageIndexBox="页" TextBeforePageIndexBox="转到" PageIndexBoxType="TextBox" ShowPageIndexBox="Always" 
                SubmitButtonText="Go" CustomInfoHTML="共%RecordCount%条数据，每页%PageSize%条，共%PageCount%页，当前为第%CurrentPageIndex%页">
            </webdiyer:AspNetPager>
            <asp:Panel ID="panMsg" runat="server" ClientIDMode=Static CssClass="msg24_attention" Visible=false>无相关数据</asp:Panel>
            <div style="text-align:center; margin:10px"><img src="../Images/Common/btn_ok0.png" onclick="doSubmit()" style="cursor:pointer" />
            &nbsp;&nbsp;&nbsp;&nbsp;<input type=image src="../Images/Common/btn_close.png" onclick="DG.cancel();" /></div>
        </td>
        <td class=tbBody_R></td>
    </tr>
    <tr>
        <td class=tbFoot_L></td>
        <td class=tbFoot_M></td>
        <td class=tbFoot_R></td>
    </tr>
</table>
</asp:Content>
